package com.exam.mapper;

import com.exam.po.FillQuestion;
import com.exam.po.JudgeQuestion;
import com.exam.po.MultiQuestion;
import com.exam.vo.AnswerVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhanggaoxiang
 * @ClassName AnswerMapper
 * @Description TODO
 * @Date 2021/1/12 11:00
 * @Version 1.0
 **/
public interface AnswerMapper {


    List<AnswerVO> findAnswerByPage(@Param("current") int current,@Param("size") int size);

    /**
     * 教师查看题库
     * @param current
     * @param size
     * @return
     */
    List<AnswerVO> findteacherAnswerByPage(@Param("current") int current,@Param("size") int size);

    int deleteAnswerById(@Param("questionId") int questionId);

    FillQuestion findFillQuesstionById(@Param("questionId") int questionId);

    JudgeQuestion findJudegeQuesstionById(@Param("questionId") int questionId);

    int deleteJudegeQuesstionById(@Param("questionId") int questionId);

    MultiQuestion findMultiQuesstionById(@Param("questionId") int questionId);

    int deleteMultiQuesstionById(@Param("questionId") int questionId);

    /**
     * 查判断题总记录
     * @return
     */
    int countByJudgeQuestion();

    /**
     *查天空题总记录
     * @return
     */
    int countByFillQuestion();
    Integer findFillQuestionCount();

    Integer findJudgeQuestionCount();

    Integer findMultiQuestionCount();

    /**
     * 查选择题总记录
     * @return
     */
    int countByMultiQuestion();
}
